
#include "Mapper086.h"

SETUP_STATIC_INES_MAPPER_REGISTRAR(86)

//------------------------------------------------------------------------------
// Name:
//------------------------------------------------------------------------------
Mapper86::Mapper86() {
	set_prg_89ab(0);
	set_prg_cdef(-1);
	set_chr_0000_1fff(0);
}

//------------------------------------------------------------------------------
// Name:
//------------------------------------------------------------------------------
std::string Mapper86::name() const {
	return "JALECO-JF-13";
}

//------------------------------------------------------------------------------
// Name:
//------------------------------------------------------------------------------
void Mapper86::write_6(uint16_t address, uint8_t value) {
	(void)address;
	const uint8_t prg_select = (value & 0x30) >> 4;
	const uint8_t chr_select = (value & 0x03) | ((value & 0x40) >> 4);

	set_prg_89abcdef(prg_select);
	set_chr_0000_1fff(chr_select);
}

//------------------------------------------------------------------------------
// Name:
//------------------------------------------------------------------------------
void Mapper86::write_7(uint16_t address, uint8_t value) {
	(void)address;
	(void)value;
	// TODO
}

